package ch.janotta.slawo.da.modifier;

import ch.janotta.slawo.da.Ability;
import ch.janotta.slawo.da.Focus;
import ch.janotta.slawo.da.SpecialPower;
import ch.janotta.slawo.da.Spell;
import ch.janotta.slawo.da.Talent;
import ch.janotta.slawo.utilities.ArrayTools;

public final class ModifierFactory {
  private ModifierFactory() {}

  public static Modifier getInstance(Ability ability) {
    return new AbilityRandomValueGenerationModifier(ability);
  }

  public static Modifier getInstance(Ability ability, int valueIncrement) {
    return new AbilityIncreaseModifier(ability, valueIncrement);
  }

  public static Modifier getInstance(Focus focus) {
    return new AdditionalFocusModifier(focus);
  }

  public static Modifier getInstance(SpecialPower power) {
    return new AdditionalSpecialPowerModifier(power);
  }

  public static Modifier getInstance(Spell spell) {
    return new AdditionalSpellModifier(spell);
  }

  public static Modifier getInstance(Talent talent) {
    return new AdditionalTalentModifier(talent);
  }

  public static Modifier getRandomInstance(Focus...focuses) {
    return new AdditionalFocusModifier(ArrayTools.getRandomMember(focuses));
  }

  public static Modifier getRandomInstance(Spell...spells) {
    return new AdditionalSpellModifier(ArrayTools.getRandomMember(spells));
  }

  public static Modifier getRandomInstance(Talent... talents) {
    return new AdditionalTalentModifier(ArrayTools.getRandomMember(talents));
  }
}
